import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    // baseLayout 都会配成 /
    path: '/',
    component: () => import('../layout/BaseLayout.vue'),
    children :[
      {
        path: '/student',
        component: () => import('../views/StudentManager.vue'),
      }
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
